/*
 * Copyright (c) 2018-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

namespace TencentCloud.Wedata.V20250806.Models
{
    using Newtonsoft.Json;
    using System.Collections.Generic;
    using TencentCloud.Common;

    public class CreateDataBackfillPlanRequest : AbstractModel
    {
        
        /// <summary>
        /// Project ID
        /// </summary>
        [JsonProperty("ProjectId")]
        public string ProjectId{ get; set; }

        /// <summary>
        /// Backfill task collection.
        /// </summary>
        [JsonProperty("TaskIds")]
        public string[] TaskIds{ get; set; }

        /// <summary>
        /// Specifies the data time configuration for the backfill task.
        /// </summary>
        [JsonProperty("DataBackfillRangeList")]
        public DataBackfillRange[] DataBackfillRangeList{ get; set; }

        /// <summary>
        /// Time zone, default UTC+8.
        /// </summary>
        [JsonProperty("TimeZone")]
        public string TimeZone{ get; set; }

        /// <summary>
        /// Backfill plan name. if left empty, a string of characters is randomly generated by system.
        /// </summary>
        [JsonProperty("DataBackfillPlanName")]
        public string DataBackfillPlanName{ get; set; }

        /// <summary>
        /// Check parent task type. valid values: NONE (do not check ALL), ALL (check ALL upstream parent tasks), MAKE_SCOPE (only check in the currently selected tasks of the backfill plan). default: NONE (do not check).
        /// </summary>
        [JsonProperty("CheckParentType")]
        public string CheckParentType{ get; set; }

        /// <summary>
        /// Specifies whether to ignore event dependency for backfill. default true.
        /// </summary>
        [JsonProperty("SkipEventListening")]
        public bool? SkipEventListening{ get; set; }

        /// <summary>
        /// Custom workflow self-dependency. valid values: yes or no. if not configured, use the original workflow self-dependency.
        /// </summary>
        [JsonProperty("RedefineSelfWorkflowDependency")]
        public string RedefineSelfWorkflowDependency{ get; set; }

        /// <summary>
        /// Customizes the degree of concurrency for instance running. if without configuring, use the existing self-dependent of the task.
        /// </summary>
        [JsonProperty("RedefineParallelNum")]
        public ulong? RedefineParallelNum{ get; set; }

        /// <summary>
        /// Scheduling resource group id. if left empty, indicates usage of the original task scheduling execution resource group.
        /// </summary>
        [JsonProperty("SchedulerResourceGroupId")]
        public string SchedulerResourceGroupId{ get; set; }

        /// <summary>
        /// Integration task resource group id. indicates usage of the original task scheduling execution resource group if empty.
        /// </summary>
        [JsonProperty("IntegrationResourceGroupId")]
        public string IntegrationResourceGroupId{ get; set; }

        /// <summary>
        /// Custom parameter. re-specifies the task's parameters to facilitate the execution of new logic by replenished instances.
        /// </summary>
        [JsonProperty("RedefineParamList")]
        public KVPair[] RedefineParamList{ get; set; }

        /// <summary>
        /// Backfill Execution Order - The execution order for backfill instances based on their data time. Effective only when both conditions are met:
        /// 
        /// 1. Must be the same cycle task.
        /// 
        /// 2. Priority is given to dependency order. If no dependencies apply, execution follows the configured order.
        /// 
        /// Valid values:
        /// 
        /// -NORMAL: No specific order (default)
        /// 
        /// -ORDER: Execute in chronological order
        /// 
        /// -REVERSE: Execute in reverse chronological order
        /// </summary>
        [JsonProperty("DataTimeOrder")]
        public string DataTimeOrder{ get; set; }

        /// <summary>
        /// Backfill Instance Regeneration Cycle - If set, this will redefine the generation cycle of backfill task instances. Currently, only daily instances can be converted into instances generated on the first day of each month.
        /// 
        /// Valid value:
        /// 
        /// MONTH_CYCLE: Monthly
        /// </summary>
        [JsonProperty("RedefineCycleType")]
        public string RedefineCycleType{ get; set; }


        /// <summary>
        /// For internal usage only. DO NOT USE IT.
        /// </summary>
        public override void ToMap(Dictionary<string, string> map, string prefix)
        {
            this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
            this.SetParamArraySimple(map, prefix + "TaskIds.", this.TaskIds);
            this.SetParamArrayObj(map, prefix + "DataBackfillRangeList.", this.DataBackfillRangeList);
            this.SetParamSimple(map, prefix + "TimeZone", this.TimeZone);
            this.SetParamSimple(map, prefix + "DataBackfillPlanName", this.DataBackfillPlanName);
            this.SetParamSimple(map, prefix + "CheckParentType", this.CheckParentType);
            this.SetParamSimple(map, prefix + "SkipEventListening", this.SkipEventListening);
            this.SetParamSimple(map, prefix + "RedefineSelfWorkflowDependency", this.RedefineSelfWorkflowDependency);
            this.SetParamSimple(map, prefix + "RedefineParallelNum", this.RedefineParallelNum);
            this.SetParamSimple(map, prefix + "SchedulerResourceGroupId", this.SchedulerResourceGroupId);
            this.SetParamSimple(map, prefix + "IntegrationResourceGroupId", this.IntegrationResourceGroupId);
            this.SetParamArrayObj(map, prefix + "RedefineParamList.", this.RedefineParamList);
            this.SetParamSimple(map, prefix + "DataTimeOrder", this.DataTimeOrder);
            this.SetParamSimple(map, prefix + "RedefineCycleType", this.RedefineCycleType);
        }
    }
}

